﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Sicurezza.Client.Controlli
{
    public class MsgBox
    {
        public static void Info(string message)
        {
            MessageBox.Show(message,
                    "Info",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Information);
        }

        public static void VerifyOk()
        {
            MessageBox.Show("Certificate received from CA and saved correctly.",
                    "Certificate received from CA",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Information);
        }

        public static void VerifyKo()
        {
            MessageBox.Show("Certificate not yet approved by CA",
                    "Certificate not ready",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Information);
        }

        public static void Rejected(string reason)
        {
            MessageBox.Show("Certificate request rejected by CA with following reason: " +
                             reason + "\n\nRequest deleted.",
                    "Request ok",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Information);
        }

        public static void Error(string errorMessage)
        {
            MessageBox.Show(errorMessage,
                    "Error",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error);
        }

        public static void RequestOk()
        {
            MessageBox.Show("Request correctly sent to CA",
            "Request ok",
            MessageBoxButtons.OK,
            MessageBoxIcon.Information);
        }

        public static void RevokedOk()
        {
            MessageBox.Show("Certificate correctly revoked by CA",
            "Request ok",
            MessageBoxButtons.OK,
            MessageBoxIcon.Information);
        }
    }
}
